package com.hotel.homehotel.before.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hotel.homehotel.before.entiy.Permission;
import com.hotel.homehotel.before.entiy.Role;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
@Mapper
public interface RoleMapper  extends BaseMapper<Role> {
   @Select(" select role_id as id,role_name as name from role WHERE role_id in (select rid from user_role   where uid= (select id from user where phone_number=#{phoneNumber}) )")
    public List<Role> getRoleMapperByPhoneNumber(String phoneNumber);
}
